package com.创建型模式.工厂模式.aimal;

public class AnimalFactory {
    public Animal getAnimal(Integer i ){
        switch(i){
            case 1:
                return new Cat();
            case 2:
                return new Dog();
            case 3:
                return new Pander();
            default:
                return new Pander();

        }
    }
}
